---
layout: apidoc
title:  "Mottle - jsplumb - Test Coverage API documentation"
date:   2014-01-01 00:00:00
yuiGridsUrl: http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css
yuiSeedUrl: http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js
projectAssets: ../assets
base: "../.."
---



<div id="doc">
    <div id="bd" class="yui3-g">
        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
    <h2 class="off-left">APIs</h2>
    <div id="api-tabview" class="tabview">
        <ul class="tabs">
            <li><a href="#api-classes">Classes</a></li>
            <li><a href="#api-modules">Modules</a></li>
        </ul>

        <div id="api-tabview-filter">
            <input type="search" id="api-filter" placeholder="Type to filter APIs">
        </div>

        <div id="api-tabview-panel">
            <ul id="api-classes" class="apis classes">
            
                <li><a href="../classes/Mottle.html">Mottle</a></li>
            
                <li><a href="../classes/Test.html">Test</a></li>
            
            </ul>

            <ul id="api-modules" class="apis modules">
            
            </ul>
        </div>
    </div>
</div>

            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
        Show:
        <label for="api-show-inherited">
            <input type="checkbox" id="api-show-inherited" checked>
            Inherited
        </label>

        <label for="api-show-protected">
            <input type="checkbox" id="api-show-protected">
            Protected
        </label>

        <label for="api-show-private">
            <input type="checkbox" id="api-show-private">
            Private
        </label>
        <label for="api-show-deprecated">
            <input type="checkbox" id="api-show-deprecated">
            Deprecated
        </label>

    </div>


            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
                        <h1>Mottle Class</h1>
<div class="box meta">
    

    

    
        <div class="foundat">
            Defined in: <a href="../files/tests_experiments_npm_browserify-test.js.html#l1023"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1023</code></a>
        </div>
    

    

    
</div>



<div class="box intro">
    <p>Mottle offers support for abstracting out the differences
between touch and mouse devices, plus "smart click" functionality
(don&#39;t fire click if the mouse has moved between mousedown and mouseup),
and synthesized click/tap events.</p>

</div>


    <div class="constructor">
        <h2>Constructor</h2>
        <div id="method_Mottle" class="method item">
    <h3 class="name"><code>Mottle</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>params</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l1023"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1023</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">params</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>Constructor params</p>

                    </div>

                    
                        <ul class="params-list">
                            
                            <li class="param">
                                
                                    <code class="param-name optional">[clickThreshold=250]</code>
                                    <span class="type">Number</span>
                                    <span class="flag optional" title="This parameter is optional.">optional</span>
                                

                                <div class="param-description">
                                    <p>Threshold, in milliseconds beyond which a touchstart followed by a touchend is not considered to be a click.</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name optional">[dblClickThreshold=450]</code>
                                    <span class="type">Number</span>
                                    <span class="flag optional" title="This parameter is optional.">optional</span>
                                

                                <div class="param-description">
                                    <p>Threshold, in milliseconds beyond which two successive tap events are not considered to be a click.</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name optional">[smartClicks=false]</code>
                                    <span class="type">Boolean</span>
                                    <span class="flag optional" title="This parameter is optional.">optional</span>
                                

                                <div class="param-description">
                                    <p>If true, won&#39;t fire click events if the mouse has moved between mousedown and mouseup. Note that this functionality
requires that Mottle consume the mousedown event, and so may not be viable in all use cases.</p>

                                </div>

                                
                            </li>
                            
                        </ul>
                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

    </div>


<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

        
            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
        
        
        
        
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

            
                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_remove">remove</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_on">on</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_off">off</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_trigger">trigger</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mottle.consume">Mottle.consume</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mottle.pageLocation">Mottle.pageLocation</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_setForceTouchEvents">setForceTouchEvents</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_setForceMouseEvents">setForceMouseEvents</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_getInputFilterSelector">getInputFilterSelector</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_setInputFilterSelector">setInputFilterSelector</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_"></a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_addToPosse">addToPosse</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_setPosse">setPosse</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_removeFromPosse">removeFromPosse</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_removeFromAllPosses">removeFromAllPosses</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_jsPlumbUtil.wrap">jsPlumbUtil.wrap</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_getAbsolutePosition">getAbsolutePosition</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_setAbsolutePosition">setAbsolutePosition</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_addGroup">addGroup</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_addToGroup">addToGroup</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_removeFromGroup">removeFromGroup</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_removeGroup">removeGroup</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_removeAllGroup">removeAllGroup</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_getGroup">getGroup</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_expandGroup">expandGroup</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_expandGroup">expandGroup</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_toggleGroup">toggleGroup</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_getGroupFor">getGroupFor</a>

                                
                                
                            </li>
                        
                    </ul>
                </div>
            

            

            

            
        </div>

        
            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>DOM</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l2087"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:2087</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">DOM</code>
                        <span class="type">Element | String</span>
                    

                    

                    <div class="param-description">
                        <p>element - or id of the element - to add.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>p1</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>p2</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Float</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l479"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:479</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">p1</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>First point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">p2</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>Second point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Float</span>:
                    
                    <p>The gradient of a line between the two points.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>p1</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>p2</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Float</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l508"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:508</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">p1</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>First point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">p2</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>Second point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Float</span>:
                    
                    <p>The length of a line between the two points.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>p1</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>p2</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Integer</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l521"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:521</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">p1</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>First point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">p2</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>Second point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Integer</span>:
                    
                    <p>The quadrant - 1 for upper right, 2 for lower right, 3 for lower left, 4 for upper left.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>p1</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>p2</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Float</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l542"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:542</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">p1</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>First point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">p2</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>Second point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Float</span>:
                    
                    <p>The angle between the two points.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>r1</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>r2</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Boolean</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l561"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:561</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">r1</code>
                        <span class="type">Rectangle</span>
                    

                    

                    <div class="param-description">
                        <p>First rectangle, as a js object in the form <code>{x:.., y:.., w:.., h:..}</code></p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">r2</code>
                        <span class="type">Rectangle</span>
                    

                    

                    <div class="param-description">
                        <p>Second rectangle, as a js object in the form <code>{x:.., y:.., w:.., h:..}</code></p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Boolean</span>:
                    
                    <p>True if the rectangles intersect, false otherwise.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>r1</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>r2</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[allowSharedEdges=false]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Boolean</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l582"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:582</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">r1</code>
                        <span class="type">Rectangle</span>
                    

                    

                    <div class="param-description">
                        <p>First rectangle, as a js object in the form <code>{x:.., y:.., w:.., h:..}</code></p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">r2</code>
                        <span class="type">Rectangle</span>
                    

                    

                    <div class="param-description">
                        <p>Second rectangle, as a js object in the form <code>{x:.., y:.., w:.., h:..}</code></p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[allowSharedEdges=false]</code>
                        <span class="type">Boolean</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>If true, the concept of enclosure allows for one or more edges to be shared by the two rectangles.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Boolean</span>:
                    
                    <p>True if r1 encloses r2, false otherwise.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>p1</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>p2</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Point</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l600"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:600</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">p1</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>First point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">p2</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>Second point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Point</span>:
                    
                    <p>Point on the line, in the form <code>{ x:..., y:... }</code>.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>p1</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>p2</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Line</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l617"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:617</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">p1</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>First point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">p2</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>Second point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Line</span>:
                    
                    <p>Perpendicular line, in the form <code>[ { x:..., y:... }, { x:..., y:... } ]</code>.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_remove" class="method item">
    <h3 class="name"><code>remove</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="../classes/Mottle.html" class="crosslink">Mottle</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l1059"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1059</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Removes an element from the DOM, and deregisters all event handlers for it. You should use this
to ensure you don&#39;t leak memory.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">String | Element</span>
                    

                    

                    <div class="param-description">
                        <p>Element, or id of the element, to remove.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="../classes/Mottle.html" class="crosslink">Mottle</a></span>:
                    
                    <p>The current Mottle instance; you can chain this method.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_on" class="method item">
    <h3 class="name"><code>on</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[children]</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>event</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>fn</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="../classes/Mottle.html" class="crosslink">Mottle</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l1084"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1084</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Register an event handler, optionally as a delegate for some set of descendant elements. Note
that this method takes either 3 or 4 arguments - if you supply 3 arguments it is assumed you have
omitted the <code>children</code> parameter, and that the event handler should be bound directly to the given element.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element | Element | String</span>
                    

                    

                    <div class="param-description">
                        <p>Either an Element, or a CSS spec for a list of elements, or an array of Elements.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[children]</code>
                        <span class="type">String</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>Comma-delimited list of selectors identifying allowed children.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">event</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>Event ID.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">fn</code>
                        <span class="type">Function</span>
                    

                    

                    <div class="param-description">
                        <p>Event handler function.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="../classes/Mottle.html" class="crosslink">Mottle</a></span>:
                    
                    <p>The current Mottle instance; you can chain this method.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_off" class="method item">
    <h3 class="name"><code>off</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>event</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>fn</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="../classes/Mottle.html" class="crosslink">Mottle</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l1105"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1105</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Cancel delegate event handling for the given function. Note that unlike with &#39;on&#39; you do not supply
a list of child selectors here: it removes event delegation from all of the child selectors for which the
given function was registered (if any).</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element | Element | String</span>
                    

                    

                    <div class="param-description">
                        <p>Element - or ID of element - from which to remove event listener.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">event</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>Event ID.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">fn</code>
                        <span class="type">Function</span>
                    

                    

                    <div class="param-description">
                        <p>Event handler function.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="../classes/Mottle.html" class="crosslink">Mottle</a></span>:
                    
                    <p>The current Mottle instance; you can chain this method.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_trigger" class="method item">
    <h3 class="name"><code>trigger</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>event</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>originalEvent</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[payload]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="../classes/Mottle.html" class="crosslink">Mottle</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l1120"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1120</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Triggers some event for a given element.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element</span>
                    

                    

                    <div class="param-description">
                        <p>Element for which to trigger the event.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">event</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>Event ID.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">originalEvent</code>
                        <span class="type">Event</span>
                    

                    

                    <div class="param-description">
                        <p>The original event. Should be optional of course, but currently is not, due
to the jsPlumb use case that caused this method to be added.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[payload]</code>
                        <span class="type">Object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>Optional object to set as <code>payload</code> on the generated event; useful for message passing.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="../classes/Mottle.html" class="crosslink">Mottle</a></span>:
                    
                    <p>The current Mottle instance; you can chain this method.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_Mottle.consume" class="method item">
    <h3 class="name"><code>Mottle.consume</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>e</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[doNotPreventDefault=false]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l1209"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1209</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Static method to assist in &#39;consuming&#39; an element: uses <code>stopPropagation</code> where available, or sets
<code>e.returnValue=false</code> where it is not.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">e</code>
                        <span class="type">Event</span>
                    

                    

                    <div class="param-description">
                        <p>Event to consume</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[doNotPreventDefault=false]</code>
                        <span class="type">Boolean</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>If true, does not call <code>preventDefault()</code> on the event.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_Mottle.pageLocation" class="method item">
    <h3 class="name"><code>Mottle.pageLocation</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>e</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Number</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l1226"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1226</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Gets the page location corresponding to the given event. For touch events this means get the page location of the first touch.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">e</code>
                        <span class="type">Event</span>
                    

                    

                    <div class="param-description">
                        <p>Event to get page location for.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Number</span>:
                    
                    <p>[left, top] for the given event.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_setForceTouchEvents" class="method item">
    <h3 class="name"><code>setForceTouchEvents</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>value</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l1234"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1234</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Forces touch events to be turned "on". Useful for testing: even if you don&#39;t have a touch device, you can still
trigger a touch event when this is switched on and it will be captured and acted on.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">value</code>
                        <span class="type">Boolean</span>
                    

                    

                    <div class="param-description">
                        <p>If true, force touch events to be on.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_setForceMouseEvents" class="method item">
    <h3 class="name"><code>setForceMouseEvents</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>value</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l1244"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:1244</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Forces mouse events to be turned "on". Useful for testing: even if you don&#39;t have a mouse, you can still
trigger a mouse event when this is switched on and it will be captured and acted on.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">value</code>
                        <span class="type">Boolean</span>
                    

                    

                    <div class="param-description">
                        <p>If true, force mouse events to be on.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_getInputFilterSelector" class="method item">
    <h3 class="name"><code>getInputFilterSelector</code></h3>

    
        <span class="paren">()</span>
    

    
        <span class="returns-inline">
            <span class="type">String</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l2032"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:2032</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Gets the selector identifying which input elements to filter from drag events.</p>

    </div>

    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">String</span>:
                    
                    <p>Current input filter selector.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_setInputFilterSelector" class="method item">
    <h3 class="name"><code>setInputFilterSelector</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>selector</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Katavorio</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l2039"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:2039</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Sets the selector identifying which input elements to filter from drag events.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">selector</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>Input filter selector to set.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Katavorio</span>:
                    
                    <p>Current instance; method may be chained.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>p1</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>p2</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Float</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l497"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:497</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">p1</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>First point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">p2</code>
                        <span class="type">Point</span>
                    

                    

                    <div class="param-description">
                        <p>Second point, either as a 2 entry array or object with <code>left</code> and <code>top</code> properties.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Float</span>:
                    
                    <p>The gradient of a normal to a line between the two points.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_" class="method item">
    <h3 class="name"><code></code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>DOM</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l2107"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:2107</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">DOM</code>
                        <span class="type">Element | String</span>
                    

                    

                    <div class="param-description">
                        <p>element - or id of the element - to remove.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_addToPosse" class="method item">
    <h3 class="name"><code>addToPosse</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>spec</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Posse | Posse</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l2297"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:2297</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Add the given element to the posse with the given id, creating the group if it at first does not exist.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element</span>
                    

                    

                    <div class="param-description">
                        <p>Element to add.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">spec</code>
                        <span class="type">String... | Object...</span>
                    

                    

                    <div class="param-description">
                        <p>Variable args parameters. Each argument can be a either a String, indicating
the ID of a Posse to which the element should be added as an active participant, or an Object containing
<code>{ id:"posseId", active:false/true}</code>. In the latter case, if <code>active</code> is not provided it is assumed to be
true.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Posse | Posse</span>:
                    
                    <p>The Posse(s) to which the element(s) was/were added.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_setPosse" class="method item">
    <h3 class="name"><code>setPosse</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>spec</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Posse | Posse</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l2318"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:2318</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Sets the posse(s) for the element with the given id, creating those that do not yet exist, and removing from
the element any current Posses that are not specified by this method call. This method will not change the
active/passive state if it is given a posse in which the element is already a member.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element</span>
                    

                    

                    <div class="param-description">
                        <p>Element to set posse(s) on.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">spec</code>
                        <span class="type">String... | Object...</span>
                    

                    

                    <div class="param-description">
                        <p>Variable args parameters. Each argument can be a either a String, indicating
the ID of a Posse to which the element should be added as an active participant, or an Object containing
<code>{ id:"posseId", active:false/true}</code>. In the latter case, if <code>active</code> is not provided it is assumed to be
true.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Posse | Posse</span>:
                    
                    <p>The Posse(s) to which the element(s) now belongs.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_removeFromPosse" class="method item">
    <h3 class="name"><code>removeFromPosse</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>posseId</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l2352"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:2352</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Remove the given element from the given posse(s).</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element</span>
                    

                    

                    <div class="param-description">
                        <p>Element to remove.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">posseId</code>
                        <span class="type">String...</span>
                    

                    

                    <div class="param-description">
                        <p>Varargs parameter: one value for each posse to remove the element from.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_removeFromAllPosses" class="method item">
    <h3 class="name"><code>removeFromAllPosses</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l2375"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:2375</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Remove the given element from all Posses to which it belongs.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element | Element</span>
                    

                    

                    <div class="param-description">
                        <p>Element to remove from Posses.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_jsPlumbUtil.wrap" class="method item">
    <h3 class="name"><code>jsPlumbUtil.wrap</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>wrappedFunction</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>newFunction</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[returnOnThisValue]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l2738"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:2738</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Wraps one function with another, creating a placeholder for the
wrapped function if it was null. this is used to wrap the various
drag/drop event functions - to allow jsPlumb to be notified of
important lifecycle events without imposing itself on the user&#39;s
drag/drop functionality.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">wrappedFunction</code>
                        <span class="type">Function</span>
                    

                    

                    <div class="param-description">
                        <p>original function to wrap; may be null.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">newFunction</code>
                        <span class="type">Function</span>
                    

                    

                    <div class="param-description">
                        <p>function to wrap the original with.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[returnOnThisValue]</code>
                        <span class="type">Object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>Optional. Indicates that the wrappedFunction should
not be executed if the newFunction returns a value matching &#39;returnOnThisValue&#39;.
note that this is a simple comparison and only works for primitives right now.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_getAbsolutePosition" class="method item">
    <h3 class="name"><code>getAbsolutePosition</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Number</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l6571"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:6571</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Gets the absolute position of some element as read from the left/top properties in its style.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element</span>
                    

                    

                    <div class="param-description">
                        <p>The element to retrieve the absolute coordinates from. <strong>Note</strong> this is a DOM element, not a selector from the underlying library.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Number</span>:
                    
                    <p>[left, top] pixel values.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_setAbsolutePosition" class="method item">
    <h3 class="name"><code>setAbsolutePosition</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>xy</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[animateFrom]</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[animateOptions]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l6585"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:6585</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Sets the absolute position of some element by setting the left/top properties in its style.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element</span>
                    

                    

                    <div class="param-description">
                        <p>The element to set the absolute coordinates on. <strong>Note</strong> this is a DOM element, not a selector from the underlying library.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">xy</code>
                        <span class="type">Number</span>
                    

                    

                    <div class="param-description">
                        <p>x and y coordinates</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[animateFrom]</code>
                        <span class="type">Number</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>Optional previous xy to animate from.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[animateOptions]</code>
                        <span class="type">Object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>Options for the animation.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_addGroup" class="method item">
    <h3 class="name"><code>addGroup</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>params</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Group</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l11994"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:11994</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Adds a group to the jsPlumb instance.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">params</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Group</span>:
                    
                    <p>The newly created Group.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_addToGroup" class="method item">
    <h3 class="name"><code>addToGroup</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>group</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l12014"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:12014</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Add an element to a group.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">group</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>Group, or ID of the group, to add the element to.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element</span>
                    

                    

                    <div class="param-description">
                        <p>Element to add to the group.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_removeFromGroup" class="method item">
    <h3 class="name"><code>removeFromGroup</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>group</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l12024"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:12024</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Remove an element from a group.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">group</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>Group, or ID of the group, to remove the element from.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">Element</span>
                    

                    

                    <div class="param-description">
                        <p>Element to add to the group.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_removeGroup" class="method item">
    <h3 class="name"><code>removeGroup</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>group</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[deleteMembers=false]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l12034"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:12034</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Remove a group, and optionally remove its members from the jsPlumb instance.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">group</code>
                        <span class="type">String | Group</span>
                    

                    

                    <div class="param-description">
                        <p>Group to delete, or ID of Grrup to delete.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[deleteMembers=false]</code>
                        <span class="type">Boolean</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>If true, group members will be removed along with the group. Otherwise they will
just be &#39;orphaned&#39; (returned to the main container).</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_removeAllGroup" class="method item">
    <h3 class="name"><code>removeAllGroup</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[deleteMembers=false]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l12045"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:12045</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Remove all groups, and optionally remove their members from the jsPlumb instance.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[deleteMembers=false]</code>
                        <span class="type">Boolean</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>If true, group members will be removed along with the groups. Otherwise they will
just be &#39;orphaned&#39; (returned to the main container).</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_getGroup" class="method item">
    <h3 class="name"><code>getGroup</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>groupId</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l12055"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:12055</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Get a group</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">groupId</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>ID of the group to get</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_expandGroup" class="method item">
    <h3 class="name"><code>expandGroup</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>group</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l12064"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:12064</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Expands a group element. jsPlumb doesn&#39;t do "everything" for you here, because what it means to expand a Group
will vary from application to application. jsPlumb does these things:</p>
<ul>
<li>Hides any connections that are internal to the group (connections between members, and connections from member of
the group to the group itself)</li>
<li>Proxies all connections for which the source or target is a member of the group.</li>
<li>Hides the proxied connections.</li>
<li>Adds the jsplumb-group-expanded class to the group&#39;s element</li>
<li>Removes the jsplumb-group-collapsed class from the group&#39;s element.</li>
</ul>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">group</code>
                        <span class="type">String | Group</span>
                    

                    

                    <div class="param-description">
                        <p>Group to expand, or ID of Group to expand.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_expandGroup" class="method item">
    <h3 class="name"><code>expandGroup</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>group</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l12082"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:12082</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Collapses a group element. jsPlumb doesn&#39;t do "everything" for you here, because what it means to collapse a Group
will vary from application to application. jsPlumb does these things:</p>
<ul>
<li>Shows any connections that are internal to the group (connections between members, and connections from member of
the group to the group itself)</li>
<li>Removes proxies for all connections for which the source or target is a member of the group.</li>
<li>Shows the previously proxied connections.</li>
<li>Adds the jsplumb-group-collapsed class to the group&#39;s element</li>
<li>Removes the jsplumb-group-expanded class from the group&#39;s element.</li>
</ul>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">group</code>
                        <span class="type">String | Group</span>
                    

                    

                    <div class="param-description">
                        <p>Group to expand, or ID of Group to expand.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_toggleGroup" class="method item">
    <h3 class="name"><code>toggleGroup</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>group</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l12105"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:12105</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Collapses or expands a group element depending on its current state. See notes in the collapseGroup and expandGroup method.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">group</code>
                        <span class="type">String | Group</span>
                    

                    

                    <div class="param-description">
                        <p>Group to expand/collapse, or ID of Group to expand/collapse.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_getGroupFor" class="method item">
    <h3 class="name"><code>getGroupFor</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>el</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Group</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/tests_experiments_npm_browserify-test.js.html#l12133"><code>tests&#x2F;experiments&#x2F;npm&#x2F;browserify-test.js:12133</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Gets the Group that the given element belongs to, null if none.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">el</code>
                        <span class="type">String | Element</span>
                    

                    

                    <div class="param-description">
                        <p>Element, or element ID.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Group</span>:
                    
                    <p>A Group, if found, or null.</p>

                
            </div>
        </div>
    

    
</div>

                
            </div>
        

        

        

        
    </div>
</div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
